<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>DOM2级事件</title>
</head>
<body>
    <button id="button">按钮</button>
    <script>
        const button = document.querySelector('#button')
        function handleClick(){
            console.log(this);
        }
        button.addEventListener('click',handleClick);
        setTimeout(()=>{
            button.removeEventListener('click',handleClick);
        },3000);
    </script>
</body>
</html>